package exams.array;

public class SearchSolutionTest {
    static SearchSolution searchSolution = new SearchSolution();

    private SearchSolutionTest() {
    }

    public static void main(String[] args) {
        testFindWord();
    }

    public static void testOrangesRotting() {
        //      int[][] input = {{2,0,1,1,1,1,1,1,1,1},{1,0,1,0,0,0,0,0,0,1},{1,0,1,0,1,1,1,1,0,1},{1,0,1,0,1,0,0,1,0,1},{1,0,1,0,1,0,0,1,0,1},{1,0,1,0,1,1,0,1,0,1},{1,0,1,0,0,0,0,1,0,1},{1,0,1,1,1,1,1,1,0,1},{1,0,0,0,0,0,0,0,0,1},{1,1,1,1,1,1,1,1,1,1}};
        int[][] input = {{2,1,1},{1,1,0},{0,1,1}};
        int res = searchSolution.orangesRotting(input);

        System.out.println(res);
    }

    public static void testFindWord() {
        String input = """
             BCDEFGH
             BAAHELL
             OOOOOLO
             DDDDDDD
             """;
        String[] lines = input.split("\n");
        char[][] matrix = new char[lines.length][lines[0].length()];
        for(int i =0; i < lines.length; i++) {
            for (int j = 0; j < lines[i].length(); j++) {
                matrix[i][j] = lines[i].charAt(j);
            }
        }
        int[] res = searchSolution.findWord("HELLODDDDD", matrix);

        System.out.println(res[0] + " " + res[1]);
    }

}